package com.yl;

import com.yl.core.listener.*;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class CommonDemoApplication {

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(CommonDemoApplication.class);
        app.addListeners(new MyApplicationStartingListener());

        app.addListeners(new MyApplicationEnvironmentPreparedListener());
        app.addListeners(new MyApplicationContextInitializedListener());
        app.addListeners(new MyApplicationPreparedListener());

        app.addListeners(new MyApplicationReadyListener());
        app.addListeners(new MyApplicationStartedListener());
        app.addListeners(new MyApplicationFailedListener());
        app.run(args);
    }

}
